cd /usr/local;
if [ ! -e "/app/apache-maven-3.5.4-bin.tar.gz maven" ]; 
 then
    if [ ! -d   "/app"  ];
        then
        mkdir /app
    fi
    cd /app;
    echo -e "\033[34m 下载安装包  \033[0m"
    wget https://mirrors.tuna.tsinghua.edu.cn/apache/maven/maven-3/3.5.4/binaries/apache-maven-3.5.4-bin.tar.gz
    cd -;
 fi
cp /app/apache-maven-3.5.4-bin.tar.gz  .
tar -zxvf apache-maven-3.5.4-bin.tar.gz maven
rm -rf apache-maven-3.5.4-bin.tar.gz
echo "MAVEN_HOME=/usr/local/maven
export MAVEN_HOME
export PATH=${PATH}:${MAVEN_HOME}/bin" >> /etc/profile

source /etc/profile

